using UnityEngine;
using System.Collections;



public class ActorController : MonoBehaviour
{
	protected ArrayList actions;
	protected ActorState _actorState = new ActorState();
	
	
	//if get action by specified type
	// return null if have not specified action
	public void Awake()
	{
		actions = new ArrayList();
	}
	public T getAction<T>() where T : Action
	{
		foreach(Action a in actions)
		{
			T retVal = (T)a;
			if(retVal != null)
			{
				return retVal;
			}
		}
		return null;
	}
	public void addAction(Action a)
	{
		actions.Add(a);
	}
	public ActorState actorState
	{
		
		get{
			return _actorState;
		}
	}
	
	
	
	
}
